home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 1
/
Cream of the Crop 1.iso
/
UTILITY
/
TASEXAM6.ARJ
/
BASE-HIA.TAS
< prev
next >
Wrap
Text File
|
1992-03-19
|
6KB
|
148 lines
{
This script is geared toward investors who like
to buy stocks at or near new highs, as they emerge
from basing patterns. It finds and graphs all stocks
which are making new highs, and all stocks which are
within 5% of their high AND have been in a narrow
trading range for a period of time.
The graph of the stock appears on the screen and any
base found is defined with red lines. Stocks making
new highs will not always show base lines. The "base"
shown in the legend on top of the price graph tells how
many days the stock has traded within 15%.
The volume graph plots the 50 day moving average and
tells how today's volume compares with the 50MA. The
5MA and 10MA comparisons are also shown. The 5MA and
10MA calculations do not include today, rather they
end yesterday. They attempt to show how volume behaved
immediately prior to today's action.
Most data is displayed on the screen during processing,
and it is saved in the output file "BASE-NH.LST".
Written 3/18/92 by Tom Rategan. Prodigy PMGV10A
Modifications made to include a for loop to find the
range and a second page of graphs.
Modified 3/18/92 Jerry Green}
#max_quotes 255
#output_file 'BASE-NH.LST'
if first_ticker then begin
writeln(
' ********* New highs and possible near base breakouts. *********
');
writeln(
' All Time |--Base--|');
writeln(
' Name Close Change %OH High %Rng Days Vol %V'
);
writeln(
' ---- ----- ------ --- ---- ---- ---- --- --'
);
end;
{**********************************************************}
{ Declare Arrays }
{**********************************************************}
hi30 : array;
lo30 : array;
hi40 : array;
lo40 : array;
hi60 : array;
lo60 : array;
hirg : array;
lorg : array;
vo50 : array;
{**********************************************************}
{ Do Some Filtering }
{**********************************************************}
qc = (quote_count-2);
hiqc = hhv(c,qc);
if quote_count < 65 then return;
if c < (hiqc*.95) then return;
if c >= hiqc then
newhigh_switch = 1;
else
newhigh_switch = 0;
hi30 = hhv(c,30);
lo30 = llv(c,30);
r30 = (1-(lo30/hi30))*100;
if r30 > 15 then return;
{**********************************************************}
{ Check Conditions }
{**********************************************************}
t = 0;
done = 0;
for i = 0; done = 0; i = i - 1;
begin
if i <= -qc then
done = 1;
if c[i] >= (hiqc*.85) then
begin
t = t + 1;
end;
else
done = 1;
end;
{**********************************************************}
{ Calculate Equations }
{**********************************************************}
rng = (1-(llv(c,t)/hhv(c,t)))*100;
hirg = hhv(c,t);
lorg = llv(c,t);
vo50 = mov(v,50,'s');
vvo50 = ((v[0]/vo50[0])*100);
v5 = mov(v,5,'s');
v5vo50 = ((v5/vo50[0])*100);
v10 = mov(v,10,'s');
v10vo50 = ((v10/vo50[0])*100);
oh = 100-((c/hiqc)*100);
chg = c[0]-c[-1];
{**********************************************************}
{ Graph Results }
{**********************************************************}
opengraph(2);
sizegraph(4,2);
graph(1,' '+format(c[0],'$%5.2f')+' is '
+format(oh,'%2.1f%')+' off '
+format(hiqc,'$%5.2f')+' high. Change= '
+format(chg,'$%2.2f')
+' Base less than '+format(rng,'%2.1f%')
+' for '+format(t,'%2.f')+' days.');
if newhigh_switch = 1 then
goto graphvol;
drawline(12,0,lorg[-1],0,lorg[-1],-t,-1);
drawline(12,0,hirg[-1],0,hirg[-1],-t,-1);
:graphvol
graph(v,'Today='+format(v[0],'%5.f')
+' 50MA='+format(vo50[0],'%5.f')
+' %Today='+format(vvo50,'%4.f%')
+' 5MA='+format(v5vo50,'%4.f%')
+' of 50MA. 10MA='+format(v10vo50,'%4.f%')
+' of',vo50,'50MA');
closegraph();
{**********************************************************}
{ Write Results }
{**********************************************************}
if newhigh_switch = 1 then
goto write_nobase;
writeln(fullname,' ',c[0],' ',chg,int(oh),'%',
hiqc,int(rng),'%',int(t),' ',int(v[0]),
int(vvo50),'%');
gosub standard_2;
:write_nobase
writeln(fullname,' ',c[0],' ',chg,int(oh),'%',hiqc,
' No Base ',int(v[0]),int(vvo50),'%');
gosub standard_2;
{**********************************************************}
{ Standard 2nd Page Graph }
{**********************************************************}
:standard_2
opengraph(4,-60,0);
graph(stoch(5,3),'5-3 Stochastic with lines on 80 and 20');
drawline(4,0,80,0,80);
drawline(4,0,20,0,20);
graph(MACD(),'MACD and Trigger',MACDTRI());
graph(CCI(10),'10 DAY CCI');
graph(rsi(14),'14 DAY Relative Strength with lines on 70 and 30');
drawline(4,0,70,0,70);
drawline(4,0,30,0,30);
closegraph();